import QtQuick 2.0
import "Clock.js" as Clock

Item {
    id: clock
    objectName: "clock"
    width: timeLabel.width
    height: timeLabel.height + dateLabel.height
    property int epoch: 0
    onEpochChanged: { Clock.dt.setTime(epoch); Clock.redrawTime(); }

    Timer {
        interval: 1000
        running: true
        repeat: true
        onTriggered: Clock.redrawTime();
    }

    Text {
        id: timeLabel
        color: "white"
        font.bold: true
        font.pointSize: 56
    }

    Text {
        id: dateLabel
        color: "white"
        font.pointSize: 24
        anchors.top: timeLabel.bottom
        anchors.horizontalCenter: parent.horizontalCenter
    }

}
